import mdButton from './mdButton/index.vue';
import mdCalendar from './mdCalendar/index.vue';
import mdInput from './mdInput/index.vue';
import mdSearch from './mdSearchContainer/index.vue'
import mdDataSelect from './mdDataSelect/index.vue'
import mdTimeSelect from './mdTimeSelect/index.vue'
import { markRaw } from 'vue'

// 组件注册

class LayoutItemMap {
  map = {};

  registerItem(key, singleItem) {
    this.map[key] = singleItem;
  }

  registerGroup(groupObj) {
    Object.assign(this.map, groupObj);
  }
}

const layoutItemMap = new LayoutItemMap();


layoutItemMap.registerItem(mdButton.name, markRaw(mdButton));
layoutItemMap.registerItem(mdCalendar.name, markRaw(mdCalendar));
layoutItemMap.registerItem(mdInput.name, markRaw(mdInput));
layoutItemMap.registerItem(mdSearch.name, markRaw(mdSearch));
layoutItemMap.registerItem(mdDataSelect.name, markRaw(mdDataSelect));
layoutItemMap.registerItem(mdTimeSelect.name, markRaw(mdTimeSelect));

export { layoutItemMap };